Scenario #1011: Create Natural Person As Partner

UseCase Create Partner => Partner: P-31011 - Michelle Matthieu

A partner can be a client or a vendor, currently we only use them for clients.

Properties

Given

name value
partnerNumber P-31011
personType NATURAL_PERSON
givenName Michelle
familyName Matthieu
contactCaption Michelle Matthieu
postalAddress         “name”: “Michelle Matthieu”,
        “street”: “An der Wandse 34”,
        “zipcode”: “22123”,
        “city”: “Hamburg”,
        “country”: “Germany”
officePhoneNumber +49 40 123456
emailAddress michelle.matthieu@example.org
birthday 1951-03-25
birthPlace Neustadt a.d.R.
birthName Eichbaum

Person: Hostsharing eG

HTTP GET "/api/hs/office/persons?name=Hostsharing+eG" \
  -H "Authorization: Bearer $HSADMINNG_JWT_BEARER" \
  `# {` \
  `#   "sub" : "uuid<hsh-alex_superuser>"` \
  `# }`
=> status: 200 OK 
[ {
  "uuid" : "806e75fe-7894-4422-86be-783107f07f3f", // Person: Hostsharing eG
  "personType" : "LEGAL_PERSON",
  "tradeName" : "Hostsharing eG",
  "salutation" : null,
  "title" : null,
  "givenName" : null,
  "familyName" : null
} ]

Even in production data we expect this query to return just a single result.

Person: Michelle Matthieu

HTTP POST "/api/hs/office/persons" \
  -H "Authorization: Bearer $HSADMINNG_JWT_BEARER" \
  `# {` \
  `#   "sub" : "uuid<hsh-alex_superuser>"` \
  `# }` \
  <<EOF
{
  "personType" : "NATURAL_PERSON",
  "givenName" : "Michelle",
  "familyName" : "Matthieu"
}
EOF
=> status: 201 CREATED 85489e3f-ec95-4785-9d99-c0eecf7a1593

Contact: Michelle Matthieu

HTTP POST "/api/hs/office/contacts" \
  -H "Authorization: Bearer $HSADMINNG_JWT_BEARER" \
  `# {` \
  `#   "sub" : "uuid<hsh-alex_superuser>"` \
  `# }` \
  <<EOF
{
  "caption" : "Michelle Matthieu",
  "postalAddress" : {
    "name" : "Michelle Matthieu",
    "street" : "An der Wandse 34",
    "zipcode" : "22123",
    "city" : "Hamburg",
    "country" : "Germany"
  },
  "phoneNumbers" : {
    "office" : "+49 40 123456"
  },
  "emailAddresses" : {
    "main" : "michelle.matthieu@example.org"
  }
}
EOF
=> status: 201 CREATED 2a4d0f8c-a478-405b-9875-2a6a4474e9c5

Create Partner: P-31011 - Michelle Matthieu

HTTP POST "/api/hs/office/partners" \
  -H "Authorization: Bearer $HSADMINNG_JWT_BEARER" \
  `# {` \
  `#   "sub" : "uuid<hsh-alex_superuser>"` \
  `# }` \
  <<EOF
{
  "partnerNumber" : "P-31011",
  "partnerRel" : {
    "anchor.uuid" : "806e75fe-7894-4422-86be-783107f07f3f", // Person: Hostsharing eG
    "holder.uuid" : "85489e3f-ec95-4785-9d99-c0eecf7a1593", // Person: Michelle Matthieu
    "contact.uuid" : "2a4d0f8c-a478-405b-9875-2a6a4474e9c5" // Contact: Michelle Matthieu
  },
  "details" : {
    "birthday" : "1951-03-25",
    "birthPlace" : "Neustadt a.d.R.",
    "birthName" : "Eichbaum"
  }
}
EOF
=> status: 201 CREATED f53178c3-bd59-4c7a-ba1a-c6a96ff281db

Verify the New Partner Relation

HTTP GET "/api/hs/office/relations?relationType=PARTNER&contactData=Michelle+Matthieu" \
  -H "Authorization: Bearer $HSADMINNG_JWT_BEARER" \
  `# {` \
  `#   "sub" : "uuid<hsh-alex_superuser>"` \
  `# }`
=> status: 200 OK 
[ {
  "uuid" : "dc7d5a82-2a3b-4523-a002-9f439903892a",
  "anchor" : {
    "uuid" : "806e75fe-7894-4422-86be-783107f07f3f", // Person: Hostsharing eG
    "personType" : "LEGAL_PERSON",
    "tradeName" : "Hostsharing eG",
    "salutation" : null,
    "title" : null,
    "givenName" : null,
    "familyName" : null
  },
  "holder" : {
    "uuid" : "85489e3f-ec95-4785-9d99-c0eecf7a1593", // Person: Michelle Matthieu
    "personType" : "NATURAL_PERSON",
    "tradeName" : null,
    "salutation" : null,
    "title" : null,
    "givenName" : "Michelle",
    "familyName" : "Matthieu"
  },
  "type" : "PARTNER",
  "mark" : null,
  "contact" : {
    "uuid" : "2a4d0f8c-a478-405b-9875-2a6a4474e9c5", // Contact: Michelle Matthieu
    "caption" : "Michelle Matthieu",
    "postalAddress" : {
      "zipcode" : "22123",
      "country" : "Germany",
      "city" : "Hamburg",
      "street" : "An der Wandse 34",
      "name" : "Michelle Matthieu"
    },
    "emailAddresses" : {
      "main" : "michelle.matthieu@example.org"
    },
    "phoneNumbers" : {
      "office" : "+49 40 123456"
    }
  }
} ]

generated on 2026-08-10 01:37:51 for branch